<?php

class AppController extends Controller {

	var $helpers = array('Html', 'Form', 'Session', 'Time', 'Number', 'Javascript', 'FixDate', 'FixText', 'Navigation');
	
	var $components = array('Auth', 'Session', 'RequestHandler');
	
	function beforeFilter() {
		$this->Auth->loginAction = array('controller' => 'users', 'action' => 'login');
		$this->Auth->loginRedirect = array('controller' => 'users', 'action' => 'updates');
		$this->Auth->logoutRedirect = array('controller' => 'pages', 'action' => 'display', 'home');
		$this->Auth->allow(array('display', 'get_random'));
		//$this->Auth->allow('*');
		$this->Auth->loginError = 'Je inloggegevens kloppen niet.';
		//$this->Auth->autoRedirect = false;
		
		$this->Auth->Authorize = 'controller';
		
	}
	
	function isAuthorized() {
		return true;
	}
	
}

?>
